package org.xwalk.core.internal;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.net.http.SslError;
import android.os.Build;
import android.text.InputType;
import android.util.Log;
import android.view.View;
import android.webkit.ValueCallback;
import android.webkit.WebResourceResponse;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;
import java.io.InputStream;
import java.security.KeyStore.PrivateKeyEntry;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Map;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class XWalkResourceClientBridge extends XWalkResourceClientInternal {
    private XWalkCoreBridge coreBridge;
    private Object wrapper;

    public Object getWrapper() {
        return wrapper;
    }



    public XWalkResourceClientBridge(XWalkViewBridge view, Object wrapper) {
        super(view);

        this.wrapper = wrapper;
        reflectionInit();

    }

        @Override
    public void onDocumentLoadedInFrame(XWalkViewInternal view, long frameId) {
        if ((view instanceof XWalkViewBridge)) {
            onDocumentLoadedInFrame((XWalkViewBridge) view, frameId);
        } else {
            super.onDocumentLoadedInFrame(view, frameId);
        }
    }

    public void onDocumentLoadedInFrame(XWalkViewBridge view, long frameId) {
        if (onDocumentLoadedInFrameXWalkViewInternallongMethod == null || onDocumentLoadedInFrameXWalkViewInternallongMethod.isNull()) {
            onDocumentLoadedInFrameSuper(view, frameId);
        } else {
            onDocumentLoadedInFrameXWalkViewInternallongMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), frameId);
        }
    }

    public void onDocumentLoadedInFrameSuper(XWalkViewBridge view, long frameId) {
        super.onDocumentLoadedInFrame(view, frameId);
    }

    private ReflectMethod onDocumentLoadedInFrameXWalkViewInternallongMethod = new ReflectMethod(null, "onDocumentLoadedInFrame");

    @Override
    public void onLoadStarted(XWalkViewInternal view, String url) {
        if ((view instanceof XWalkViewBridge)) {
            onLoadStarted((XWalkViewBridge) view, url);
        } else {
            super.onLoadStarted(view, url);
        }
    }

    public void onLoadStarted(XWalkViewBridge view, String url) {
        if (onLoadStartedXWalkViewInternalStringMethod == null || onLoadStartedXWalkViewInternalStringMethod.isNull()) {
            onLoadStartedSuper(view, url);
        } else {
            onLoadStartedXWalkViewInternalStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url);
        }
    }

    public void onLoadStartedSuper(XWalkViewBridge view, String url) {
        super.onLoadStarted(view, url);
    }

    private ReflectMethod onLoadStartedXWalkViewInternalStringMethod = new ReflectMethod(null, "onLoadStarted");

    private ReflectMethod onReceivedResponseXWalkViewInternalStringMethod = new ReflectMethod(null, "onReceivedResponse");

    @Override
    public void onReceivedResponse(XWalkViewInternal view, String url) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedResponse((XWalkViewBridge) view, url);
        } else {
            super.onReceivedResponse(view, url);
        }
    }

    public void onReceivedResponse(XWalkViewBridge view, String url) {
        if (onReceivedResponseXWalkViewInternalStringMethod == null || onReceivedResponseXWalkViewInternalStringMethod.isNull()) {
            onReceivedResponseSuper(view,url);
        } else {
            onReceivedResponseXWalkViewInternalStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url);
        }
    }

    public void onReceivedResponseSuper(XWalkViewBridge view, String url) {
        super.onReceivedResponse(view, url);
    }

    @Override
    public void onLoadFinished(XWalkViewInternal view, String url) {
        if ((view instanceof XWalkViewBridge)) {
            onLoadFinished((XWalkViewBridge) view, url);
        } else {
            super.onLoadFinished(view, url);
        }
    }

    public void onLoadFinished(XWalkViewBridge view, String url) {
        if (onLoadFinishedXWalkViewInternalStringMethod == null || onLoadFinishedXWalkViewInternalStringMethod.isNull()) {
            onLoadFinishedSuper(view, url);
        } else {
            onLoadFinishedXWalkViewInternalStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url);
        }
    }

    public void onLoadFinishedSuper(XWalkViewBridge view, String url) {
        super.onLoadFinished(view, url);
    }

    private ReflectMethod onLoadFinishedXWalkViewInternalStringMethod = new ReflectMethod(null, "onLoadFinished");

    @Override
    public void onProgressChanged(XWalkViewInternal view, int progressInPercent) {
        if ((view instanceof XWalkViewBridge)) {
            onProgressChanged((XWalkViewBridge) view, progressInPercent);
        } else {
            super.onProgressChanged(view, progressInPercent);
        }
    }

    public void onProgressChanged(XWalkViewBridge view, int progressInPercent) {
        if (onProgressChangedXWalkViewInternalintMethod == null || onProgressChangedXWalkViewInternalintMethod.isNull()) {
            onProgressChangedSuper(view, progressInPercent);
        } else {
            onProgressChangedXWalkViewInternalintMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), progressInPercent);
        }
    }

    public void onProgressChangedSuper(XWalkViewBridge view, int progressInPercent) {
        super.onProgressChanged(view, progressInPercent);
    }

    private ReflectMethod onProgressChangedXWalkViewInternalintMethod = new ReflectMethod(null, "onProgressChanged");

    @Override
    public WebResourceResponse shouldInterceptLoadRequest(XWalkViewInternal view, String url) {
        if ((view instanceof XWalkViewBridge)) {
            return shouldInterceptLoadRequest((XWalkViewBridge) view, url);
        } else {
            return super.shouldInterceptLoadRequest(view, url);
        }
    }

    public WebResourceResponse shouldInterceptLoadRequest(XWalkViewBridge view, String url) {
        if (shouldInterceptLoadRequestXWalkViewInternalStringMethod == null || shouldInterceptLoadRequestXWalkViewInternalStringMethod.isNull()) {
            return shouldInterceptLoadRequestSuper(view, url);
        } else {
            return (WebResourceResponse)shouldInterceptLoadRequestXWalkViewInternalStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url);
        }
    }

    public WebResourceResponse shouldInterceptLoadRequestSuper(XWalkViewBridge view, String url) {
        WebResourceResponse ret;
        ret = super.shouldInterceptLoadRequest(view, url);
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod shouldInterceptLoadRequestXWalkViewInternalStringMethod = new ReflectMethod(null, "shouldInterceptLoadRequest");

    @Override
    public XWalkWebResourceResponseInternal shouldInterceptLoadRequest(XWalkViewInternal view, XWalkWebResourceRequestInternal request) {
        if ((view instanceof XWalkViewBridge)) {
            return shouldInterceptLoadRequest((XWalkViewBridge) view, (request instanceof XWalkWebResourceRequestHandlerBridge ? ((XWalkWebResourceRequestHandlerBridge) request ) : new XWalkWebResourceRequestHandlerBridge((XWalkWebResourceRequestHandlerInternal) request)));
        } else {
            return super.shouldInterceptLoadRequest(view, request);
        }
    }

    public XWalkWebResourceResponseInternal shouldInterceptLoadRequest(XWalkViewBridge view, XWalkWebResourceRequestHandlerBridge request) {
        if (shouldInterceptLoadRequestXWalkViewInternalXWalkWebResourceRequestInternalMethod == null || shouldInterceptLoadRequestXWalkViewInternalXWalkWebResourceRequestInternalMethod.isNull()) {
            return shouldInterceptLoadRequestSuper(view, request);
        } else {
            return (XWalkWebResourceResponseBridge)coreBridge.getBridgeObject(shouldInterceptLoadRequestXWalkViewInternalXWalkWebResourceRequestInternalMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), (request instanceof XWalkWebResourceRequestHandlerBridge ? ((XWalkWebResourceRequestHandlerBridge) request ) : new XWalkWebResourceRequestHandlerBridge((XWalkWebResourceRequestHandlerInternal) request)).getWrapper()));
        }
    }

    public XWalkWebResourceResponseBridge shouldInterceptLoadRequestSuper(XWalkViewBridge view, XWalkWebResourceRequestHandlerBridge request) {
        XWalkWebResourceResponseInternal ret;
        ret = super.shouldInterceptLoadRequest(view, request);
        if (ret == null) return null;
        return (ret instanceof XWalkWebResourceResponseBridge ? ((XWalkWebResourceResponseBridge) ret ) : new XWalkWebResourceResponseBridge(ret));
    }

    private ReflectMethod shouldInterceptLoadRequestXWalkViewInternalXWalkWebResourceRequestInternalMethod = new ReflectMethod(null, "shouldInterceptLoadRequest");

    @Override
    public void onReceivedLoadError(XWalkViewInternal view, int errorCode, String description, String failingUrl) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedLoadError((XWalkViewBridge) view, errorCode, description, failingUrl);
        } else {
            super.onReceivedLoadError(view, errorCode, description, failingUrl);
        }
    }

    public void onReceivedLoadError(XWalkViewBridge view, int errorCode, String description, String failingUrl) {
        if (onReceivedLoadErrorXWalkViewInternalintStringStringMethod == null || onReceivedLoadErrorXWalkViewInternalintStringStringMethod.isNull()) {
            onReceivedLoadErrorSuper(view, errorCode, description, failingUrl);
        } else {
            onReceivedLoadErrorXWalkViewInternalintStringStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), errorCode, description, failingUrl);
        }
    }

    public void onReceivedLoadErrorSuper(XWalkViewBridge view, int errorCode, String description, String failingUrl) {
        super.onReceivedLoadError(view, errorCode, description, failingUrl);
    }

    private ReflectMethod onReceivedLoadErrorXWalkViewInternalintStringStringMethod = new ReflectMethod(null, "onReceivedLoadError");

    @Override
    public boolean shouldOverrideUrlLoading(XWalkViewInternal view, String url) {
        if ((view instanceof XWalkViewBridge)) {
            return shouldOverrideUrlLoading((XWalkViewBridge) view, url);
        } else {
            return super.shouldOverrideUrlLoading(view, url);
        }
    }

    public boolean shouldOverrideUrlLoading(XWalkViewBridge view, String url) {
        if (shouldOverrideUrlLoadingXWalkViewInternalStringMethod == null || shouldOverrideUrlLoadingXWalkViewInternalStringMethod.isNull()) {
            return shouldOverrideUrlLoadingSuper(view, url);
        } else {
            return (Boolean)shouldOverrideUrlLoadingXWalkViewInternalStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url);
        }
    }

    public boolean shouldOverrideUrlLoadingSuper(XWalkViewBridge view, String url) {
        boolean ret;
        ret = super.shouldOverrideUrlLoading(view, url);

        return ret;
    }

    private ReflectMethod shouldOverrideUrlLoadingXWalkViewInternalStringMethod = new ReflectMethod(null, "shouldOverrideUrlLoading");

    @Override
    public void onReceivedSslError(XWalkViewInternal view, ValueCallback<Boolean> callback, SslError error) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedSslError((XWalkViewBridge) view, callback, error);
        } else {
            super.onReceivedSslError(view, callback, error);
        }
    }

    public void onReceivedSslError(XWalkViewBridge view, ValueCallback<Boolean> callback, SslError error) {
        if (onReceivedSslErrorXWalkViewInternalValueCallbackSslErrorMethod == null || onReceivedSslErrorXWalkViewInternalValueCallbackSslErrorMethod.isNull()) {
            onReceivedSslErrorSuper(view, callback, error);
        } else {
            onReceivedSslErrorXWalkViewInternalValueCallbackSslErrorMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), callback, error);
        }
    }

    public void onReceivedSslErrorSuper(XWalkViewBridge view, ValueCallback<Boolean> callback, SslError error) {
        super.onReceivedSslError(view, callback, error);
    }

    private ReflectMethod onReceivedSslErrorXWalkViewInternalValueCallbackSslErrorMethod = new ReflectMethod(null, "onReceivedSslError");

    @Override
    public void onReceivedClientCertRequest(XWalkViewInternal view, ClientCertRequestInternal handler) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedClientCertRequest((XWalkViewBridge) view, (handler instanceof ClientCertRequestHandlerBridge ? ((ClientCertRequestHandlerBridge) handler ) : new ClientCertRequestHandlerBridge((ClientCertRequestHandlerInternal) handler)));
        } else {
            super.onReceivedClientCertRequest(view, handler);
        }
    }

    public void onReceivedClientCertRequest(XWalkViewBridge view, ClientCertRequestHandlerBridge handler) {
        if (onReceivedClientCertRequestXWalkViewInternalClientCertRequestInternalMethod == null || onReceivedClientCertRequestXWalkViewInternalClientCertRequestInternalMethod.isNull()) {
            onReceivedClientCertRequestSuper(view, handler);
        } else {
            onReceivedClientCertRequestXWalkViewInternalClientCertRequestInternalMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), (handler instanceof ClientCertRequestHandlerBridge ? ((ClientCertRequestHandlerBridge) handler ) : new ClientCertRequestHandlerBridge((ClientCertRequestHandlerInternal) handler)).getWrapper());
        }
    }

    public void onReceivedClientCertRequestSuper(XWalkViewBridge view, ClientCertRequestHandlerBridge handler) {
        super.onReceivedClientCertRequest(view, handler);
    }

    private ReflectMethod onReceivedClientCertRequestXWalkViewInternalClientCertRequestInternalMethod = new ReflectMethod(null, "onReceivedClientCertRequest");

    @Override
    public void onReceivedResponseHeaders(XWalkViewInternal view, XWalkWebResourceRequestInternal request, XWalkWebResourceResponseInternal response) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedResponseHeaders((XWalkViewBridge) view, (request instanceof XWalkWebResourceRequestHandlerBridge ? ((XWalkWebResourceRequestHandlerBridge) request ) : new XWalkWebResourceRequestHandlerBridge((XWalkWebResourceRequestHandlerInternal) request)), (response instanceof XWalkWebResourceResponseBridge ? ((XWalkWebResourceResponseBridge) response ) : new XWalkWebResourceResponseBridge(response)));
        } else {
            super.onReceivedResponseHeaders(view, request, response);
        }
    }

    public void onReceivedResponseHeaders(XWalkViewBridge view, XWalkWebResourceRequestHandlerBridge request, XWalkWebResourceResponseBridge response) {
        if (onReceivedResponseHeadersXWalkViewInternalXWalkWebResourceRequestInternalXWalkWebResourceResponseInternalMethod == null || onReceivedResponseHeadersXWalkViewInternalXWalkWebResourceRequestInternalXWalkWebResourceResponseInternalMethod.isNull()) {
            onReceivedResponseHeadersSuper(view, request, response);
        } else {
            onReceivedResponseHeadersXWalkViewInternalXWalkWebResourceRequestInternalXWalkWebResourceResponseInternalMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), (request instanceof XWalkWebResourceRequestHandlerBridge ? ((XWalkWebResourceRequestHandlerBridge) request ) : new XWalkWebResourceRequestHandlerBridge((XWalkWebResourceRequestHandlerInternal) request)).getWrapper(), (response instanceof XWalkWebResourceResponseBridge ? ((XWalkWebResourceResponseBridge) response ) : new XWalkWebResourceResponseBridge(response)).getWrapper());
        }
    }

    public void onReceivedResponseHeadersSuper(XWalkViewBridge view, XWalkWebResourceRequestHandlerBridge request, XWalkWebResourceResponseBridge response) {
        super.onReceivedResponseHeaders(view, request, response);
    }

    private ReflectMethod onReceivedResponseHeadersXWalkViewInternalXWalkWebResourceRequestInternalXWalkWebResourceResponseInternalMethod = new ReflectMethod(null, "onReceivedResponseHeaders");

    @Override
    public void doUpdateVisitedHistory(XWalkViewInternal view, String url, boolean isReload) {
        if ((view instanceof XWalkViewBridge)) {
            doUpdateVisitedHistory((XWalkViewBridge) view, url, isReload);
        } else {
            super.doUpdateVisitedHistory(view, url, isReload);
        }
    }

    public void doUpdateVisitedHistory(XWalkViewBridge view, String url, boolean isReload) {
        if (doUpdateVisitedHistoryXWalkViewInternalStringbooleanMethod == null || doUpdateVisitedHistoryXWalkViewInternalStringbooleanMethod.isNull()) {
            doUpdateVisitedHistorySuper(view, url, isReload);
        } else {
            doUpdateVisitedHistoryXWalkViewInternalStringbooleanMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), url, isReload);
        }
    }

    public void doUpdateVisitedHistorySuper(XWalkViewBridge view, String url, boolean isReload) {
        super.doUpdateVisitedHistory(view, url, isReload);
    }

    private ReflectMethod doUpdateVisitedHistoryXWalkViewInternalStringbooleanMethod = new ReflectMethod(null, "doUpdateVisitedHistory");

    @Override
    public void onReceivedHttpAuthRequest(XWalkViewInternal view, XWalkHttpAuthHandlerInternal handler, String host, String realm) {
        if ((view instanceof XWalkViewBridge)) {
            onReceivedHttpAuthRequest((XWalkViewBridge) view, (handler instanceof XWalkHttpAuthHandlerBridge ? ((XWalkHttpAuthHandlerBridge) handler ) : new XWalkHttpAuthHandlerBridge(handler)), host, realm);
        } else {
            super.onReceivedHttpAuthRequest(view, handler, host, realm);
        }
    }

    public void onReceivedHttpAuthRequest(XWalkViewBridge view, XWalkHttpAuthHandlerBridge handler, String host, String realm) {
        if (onReceivedHttpAuthRequestXWalkViewInternalXWalkHttpAuthHandlerInternalStringStringMethod == null || onReceivedHttpAuthRequestXWalkViewInternalXWalkHttpAuthHandlerInternalStringStringMethod.isNull()) {
            onReceivedHttpAuthRequestSuper(view, handler, host, realm);
        } else {
            onReceivedHttpAuthRequestXWalkViewInternalXWalkHttpAuthHandlerInternalStringStringMethod.invoke((view instanceof XWalkViewBridge ? ((XWalkViewBridge) view ) : null).getWrapper(), (handler instanceof XWalkHttpAuthHandlerBridge ? ((XWalkHttpAuthHandlerBridge) handler ) : new XWalkHttpAuthHandlerBridge(handler)).getWrapper(), host, realm);
        }
    }

    public void onReceivedHttpAuthRequestSuper(XWalkViewBridge view, XWalkHttpAuthHandlerBridge handler, String host, String realm) {
        super.onReceivedHttpAuthRequest(view, handler, host, realm);
    }

    private ReflectMethod onReceivedHttpAuthRequestXWalkViewInternalXWalkHttpAuthHandlerInternalStringStringMethod = new ReflectMethod(null, "onReceivedHttpAuthRequest");

    @Override
    public XWalkWebResourceResponseInternal createXWalkWebResourceResponse(String mimeType, String encoding, InputStream data) {
        if (createXWalkWebResourceResponseStringStringInputStreamMethod == null || createXWalkWebResourceResponseStringStringInputStreamMethod.isNull()) {
            return createXWalkWebResourceResponseSuper(mimeType, encoding, data);
        } else {
            return (XWalkWebResourceResponseBridge)coreBridge.getBridgeObject(createXWalkWebResourceResponseStringStringInputStreamMethod.invoke(mimeType, encoding, data));
        }
    }

    public XWalkWebResourceResponseBridge createXWalkWebResourceResponseSuper(String mimeType, String encoding, InputStream data) {
        XWalkWebResourceResponseInternal ret;
        ret = super.createXWalkWebResourceResponse(mimeType, encoding, data);
        if (ret == null) return null;
        return (ret instanceof XWalkWebResourceResponseBridge ? ((XWalkWebResourceResponseBridge) ret ) : new XWalkWebResourceResponseBridge(ret));
    }

    private ReflectMethod createXWalkWebResourceResponseStringStringInputStreamMethod = new ReflectMethod(null, "createXWalkWebResourceResponse");

    @Override
    public XWalkWebResourceResponseInternal createXWalkWebResourceResponse(String mimeType, String encoding, InputStream data, int statusCode, String reasonPhrase, Map<String, String> responseHeaders) {
        if (createXWalkWebResourceResponseStringStringInputStreamintStringMapMethod == null || createXWalkWebResourceResponseStringStringInputStreamintStringMapMethod.isNull()) {
            return createXWalkWebResourceResponseSuper(mimeType, encoding, data, statusCode, reasonPhrase, responseHeaders);
        } else {
            return (XWalkWebResourceResponseBridge)coreBridge.getBridgeObject(createXWalkWebResourceResponseStringStringInputStreamintStringMapMethod.invoke(mimeType, encoding, data, statusCode, reasonPhrase, responseHeaders));
        }
    }

    public XWalkWebResourceResponseBridge createXWalkWebResourceResponseSuper(String mimeType, String encoding, InputStream data, int statusCode, String reasonPhrase, Map<String, String> responseHeaders) {
        XWalkWebResourceResponseInternal ret;
        ret = super.createXWalkWebResourceResponse(mimeType, encoding, data, statusCode, reasonPhrase, responseHeaders);
        if (ret == null) return null;
        return (ret instanceof XWalkWebResourceResponseBridge ? ((XWalkWebResourceResponseBridge) ret ) : new XWalkWebResourceResponseBridge(ret));
    }

    private ReflectMethod createXWalkWebResourceResponseStringStringInputStreamintStringMapMethod = new ReflectMethod(null, "createXWalkWebResourceResponse");


    void reflectionInit() {
        coreBridge = XWalkCoreBridge.getInstance();
        if (coreBridge == null) return;

        onDocumentLoadedInFrameXWalkViewInternallongMethod.init(wrapper, null,
                "onDocumentLoadedInFrame", coreBridge.getWrapperClass("XWalkView"), long.class);
        onLoadStartedXWalkViewInternalStringMethod.init(wrapper, null,
                "onLoadStarted", coreBridge.getWrapperClass("XWalkView"), String.class);
        onLoadFinishedXWalkViewInternalStringMethod.init(wrapper, null,
                "onLoadFinished", coreBridge.getWrapperClass("XWalkView"), String.class);
        onProgressChangedXWalkViewInternalintMethod.init(wrapper, null,
                "onProgressChanged", coreBridge.getWrapperClass("XWalkView"), int.class);
        shouldInterceptLoadRequestXWalkViewInternalStringMethod.init(wrapper, null,
                "shouldInterceptLoadRequest", coreBridge.getWrapperClass("XWalkView"), String.class);
        shouldInterceptLoadRequestXWalkViewInternalXWalkWebResourceRequestInternalMethod.init(wrapper, null,
                "shouldInterceptLoadRequest", coreBridge.getWrapperClass("XWalkView"), coreBridge.getWrapperClass("XWalkWebResourceRequest"));
        onReceivedLoadErrorXWalkViewInternalintStringStringMethod.init(wrapper, null,
                "onReceivedLoadError", coreBridge.getWrapperClass("XWalkView"), int.class, String.class, String.class);
        shouldOverrideUrlLoadingXWalkViewInternalStringMethod.init(wrapper, null,
                "shouldOverrideUrlLoading", coreBridge.getWrapperClass("XWalkView"), String.class);
        onReceivedSslErrorXWalkViewInternalValueCallbackSslErrorMethod.init(wrapper, null,
                "onReceivedSslError", coreBridge.getWrapperClass("XWalkView"), ValueCallback.class, SslError.class);
        onReceivedClientCertRequestXWalkViewInternalClientCertRequestInternalMethod.init(wrapper, null,
                "onReceivedClientCertRequest", coreBridge.getWrapperClass("XWalkView"), coreBridge.getWrapperClass("ClientCertRequest"));
        onReceivedResponseHeadersXWalkViewInternalXWalkWebResourceRequestInternalXWalkWebResourceResponseInternalMethod.init(wrapper, null,
                "onReceivedResponseHeaders", coreBridge.getWrapperClass("XWalkView"), coreBridge.getWrapperClass("XWalkWebResourceRequest"), coreBridge.getWrapperClass("XWalkWebResourceResponse"));
        doUpdateVisitedHistoryXWalkViewInternalStringbooleanMethod.init(wrapper, null,
                "doUpdateVisitedHistory", coreBridge.getWrapperClass("XWalkView"), String.class, boolean.class);
        onReceivedHttpAuthRequestXWalkViewInternalXWalkHttpAuthHandlerInternalStringStringMethod.init(wrapper, null,
                "onReceivedHttpAuthRequest", coreBridge.getWrapperClass("XWalkView"), coreBridge.getWrapperClass("XWalkHttpAuthHandler"), String.class, String.class);
        createXWalkWebResourceResponseStringStringInputStreamMethod.init(wrapper, null,
                "createXWalkWebResourceResponse", String.class, String.class, InputStream.class);
        createXWalkWebResourceResponseStringStringInputStreamintStringMapMethod.init(wrapper, null,
                "createXWalkWebResourceResponse", String.class, String.class, InputStream.class, int.class, String.class, Map.class);
        onReceivedResponseXWalkViewInternalStringMethod.init(wrapper,null,
                "onReceivedResponse",coreBridge.getWrapperClass("XWalkView"),String.class);
    }
}
